﻿function LlamarWebService(url, parametro, funcion1, funcion2) {

    $.ajax({
        type: "POST",
        url: url,
        data: parametro,
        async: true, //por defecto es true
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (response) {
            eval(funcion1(response.d));
       },
        error: function (xhr, status, error) {
            alert(xhr.responseText);
        }
    });

}

function FuncionOk() {
    alert("OK")
}

function FuncionFallo() {
    alert("FALLO")
}
